package com.sailfish.springbootdemo.controller.db1;

import com.sailfish.springbootdemo.pojo.Result;
import com.sailfish.springbootdemo.service.db1.AuditHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/auditHistory")
public class AuditHistoryController {

    @Autowired
    private AuditHistoryService auditHistoryService;

    @PostMapping("/getAuditHistory")
    public Result getAuditHistory(Integer auditType, Integer relatedId) {
        return auditHistoryService.getAuditHistory(auditType, relatedId);
    }
}
